import $r from '@/utils/request'

export async function handleSupplier(params = {}, method = 'POST') {
  return $r('/Amaidan-Goods-Web/goods/resGoodsSupplierInfo/supplierInfo', {
    method,
    data: params,
  })
}
export async function changeRecommend(params = {}, method = 'POST') {
  return $r('/Amaidan-Distribution-Web/distribution/distributionGoodsRef/changeTopRecommend', {
    method,
    data: params,
  })
}
export async function changePopular(params = {}, method = 'POST') {
  return $r('/Amaidan-Distribution-Web/distribution/distributionGoodsRef/changePopularityRecommend', {
    method,
    data: params,
  })
}
export async function getProvider(params = {}, pn = 1, ps = 10) {
  return $r(`/Amaidan-Distribution-Web/distribution/distributionGoodsRef/distributionGoods/channelProvider/${pn}/${ps}`, {
    method: 'GET',
    params,
  })
}
export async function fetchGoods(params = {}) {
  return $r('/Amaidan-Goods-Web/resGoods/change/selectGoodsStatus', {
    method: 'POST',
    params,
  })
}
